/**
 * 系统配置类
 *
 * @author songxinfeng
 * @email sxf02615@163.com
 * @date 2025/1/15
 */
package com.sxf.crm.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

/**
 * 系统配置类
 * 包含RestTemplate和定时任务配置
 * 
 * @author songxinfeng
 * @date 2025/1/15
 */
@Configuration
@EnableScheduling
public class SystemConfig {

    @Bean
    public RestTemplate restTemplate() {
        SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
        factory.setConnectTimeout(10000); // 连接超时10秒
        factory.setReadTimeout(15000);    // 读取超时15秒
        
        return new RestTemplate(factory);
    }
} 